package basic;



public class UsePhone {
    public static void main(String[] args) {
        //小米
        phone xiaomi=new phone();
        xiaomi.price=3999;
        xiaomi.triageName="雷军";
        xiaomi.who="小明";
        xiaomi.phoneColor="红色";
        xiaomi.phoneName="小米10";
        xiaomi.call();
        xiaomi.goodPhone();
        System.out.println("==========================");
        //华为
        phone huawei=new phone();
        huawei.phoneName="华为Note5";
        huawei.phoneColor="蓝色";
        huawei.who="小明";
        huawei.triageName="任正非";
        huawei.price=4000;
        huawei.call();
        huawei.goodPhone();
        //魅族
        phone meizu=new phone();
        meizu.phoneName="魅族17";
        meizu.phoneColor="蓝色";
        meizu.who="明哥";
        meizu.price=3999;
        meizu.triageName="平哥";
        meizu.method(meizu);
        //苹果
        phone iosPhone=getPhone();
        System.out.println(iosPhone.phoneName);
        System.out.println(iosPhone.phoneColor);
        System.out.println(iosPhone.phoneColor);
    }
    //将对象作为方法的返回值
    public static phone getPhone(){
        phone apple=new phone();
        apple.phoneName="苹果";
        apple.price=8888;
        apple.phoneColor="玫瑰金";
        return apple;
    }
}
